/*

 @name    : 锅巴汉化 - Web汉化插件
 @author  : 麦子、JAR、小蓝、好阳光的小锅巴
 @version : V0.6.1 - 2019-07-09
 @website : http://www.g8hh.com

*/

//1.汉化杂项
var cnItems = {
    _OTHER_: [],

    //未分类：
    'Save': '保存',
    'Export': '导出',
    'Import': '导入',
    'Settings': '设置',
    'Achievements': '成就',
    'Statistics': '统计',
    'Changelog': '更新日志',
    'Hotkeys': '快捷键',
    'ALL': '全部',
    'Default': '默认',
    'AUTO': '自动',
    'default': '默认',
    "Achievement Gotten!": "成就获得！",
    "~2^10 factor": "~2^10 因子",
    "Automation": "自动化",
    "Base++": "基础++",
    "Buyable challenge!": "可购买挑战！",
    "Buyable challenge?": "可购买挑战？",
    "Challenged": "已挑战",
    "Currently": "当前",
    "Factor": "因子",
    "First": "第一",
    "Complete Buyable upgrader once.": "完成一次可购买升级者。",
    "Complete Buyable upgrader three times.": "完成可购买升级者 3 次。",
    "complete / factor. Reward: Number x2.": "完整/因子。 奖励：数字 x2。",
    "Gain more points based on numbers.": "根据数字获得更多点数。",
    "Link": "链接",
    "points": "点数",
    "Save bank": "存档银行",
    "Gain more numbers based on points.": "根据点数获得更多数字。",
    "Guide": "指南",
    "Hardcap table": "硬上限表",
    "Numbers": "数字",
    "Points boost itself.": "点数提升自身。",
    "Quadruple point gain.": "四倍点数增益。",
    "Reset for +": "重置获得 + ",
    "Buyables": "可购买",
    "Congratulations, You reach the endgame.": "恭喜你，你到达了残局。",
    "Upgrades": "升级",
    "one to fifteen": "一到十五",
    "Over Cheaper": "便宜多了",
    "Raise point gain to 1.14.": "将点数增益提高到 1.14。",
    "Remove the third hardcap of '3'. You can buy this upgrade while you are in Factor Challenge 11.": "删除“3”的第三个硬上限。 您可以在 因子挑战 11 中购买此升级。",
    "Second infinity": "第二个无限",
    "Speed": "速度",
    "Super Challenged": "超级挑战",
    "Super click": "超级点击",
    "Ten Upgrade": "十升级",
    "The first layer": "第一层",
    "The greatest shapes": "最伟大的形状",
    "The sixth row layer": "第六行层",
    "Tickspeed from AD": "来自 AD 的 Tick速度",
    "True Infinity": "真无限",
    "True OM": "真OM",
    "twofinity challenge": "双无限挑战",
    "Unlock a challenge.": "解锁一个挑战。",
    "Unlock tickspeed.": "解锁tick速度。",
    "Upgrade factor boost number gain.": "升级因子提升数字增益。",
    "You can explore upgrade factor challenge.": "您可以探索升级因子挑战。",
    "ω boost": "ω 提升",
    "A new game": "一个新游戏",
    "Boost '3'. You can buy this upgrade while you are in Factor Challenge 4.": "提升'3'。 您可以在 因子挑战 4 中购买此升级。",
    "Boost '5' and keep all number upgrade on reset. You can buy this upgrade while you are in Factor Challenge 1.": "提升“5”并在重置时保持所有数字升级。 您可以在 因子挑战 1 中购买此升级。",
    "Boost factor beta.": "提升因子β。",
    "Complete Infinity Point challenge 1": "完成无限点挑战 1",
    "Complete NNC4.": "完成 NNC4.",
    "Complete NNC6.": "完成 NNC6.",
    "Complete Super 3 in 1": "完成超级3合1",
    "Do ω once.": "做一次ω。",
    "Don't forget achievements": "不要忘记成就",
    "Don't forget achievements again.": "不要再次忘记成就。",
    "Feature Factor": "特征因子",
    "Five 1": "五 1",
    "Free Infinity": "免费无限",
    "Get 1 ???.": "获得 1 ???.",
    "Get 1 Ordinal.": "获得 1 序数。",
    "Get 1 Ordinal  Mathematician.": "获得 1 序数数学家。",
    "Get 1 Mathematics Symbol.": "获得 1 数学符号。",
    "Get 1 Mathematician.": "获得 1 数学家。",
    "Get 1 shapes.": "获得 1 图形。",
    "Get 1 upgrade factor.": "获得 1 升级因子。",
    "Get 1 upgrade.": "获得 1 升级。",
    "Get 1 Infinity.": "获得 1 无限。",
    "Get 1 super prestige point.": "获得 1 超级声望点。",
    "Get 1.8e308 point.": "获得 1 1.8e308 点数。",
    "Get 1000 factor": "获得 1000 因子",
    "Get 1 prestige point.": "获得 1 声望点。",
    "Get 1 Infinity point.": "获得 1 无限点。",
    "Get 1 Eternity point.": "获得 1 永恒点。",
    "Get 1 Factor shift.": "获得 1 因子偏移。",
    "Get 1 factor.": "获得 1 因子。",
    "Get 1.8e258 Number in IC2, reward: Number x1e50 in Row 1, 3 Infinity Challenge.": "在 IC2 中获得 1.8e258 数字，奖励：第 1、3 行无限挑战中的数字 x1e50。",
    "Get 18 Number Upgrade, reward: Number x5.": "获得18个数字升级，奖励：数字x5。",
    "Get 1e25000 Number in IC3. Reward: Unlock 1 Infinity challenge.": "在 IC3 中获取 1e25000 数字。 奖励：解锁 1 个无限挑战。",
    "Get 1e50 Negative numbers in IC5, reward: Unlock 1 Number buyable.": "在IC5中获得1e50个负数，奖励：解锁1个可购买的数字。",
    "Get 2 Infinity, reward: Unlock 1 upgrade.": "获得 2 无限，奖励：解锁 1 次升级。",
    "Get 23 Factor Upgrade. Reward: Number x1e5": "获得 23 因子升级。 奖励：数字 x1e5",
    "Get 3 Infinity.": "获得 3 无限。",
    "Get 5 factors.": "获得 5 因子。",
    "get Both": "得到两者",
    "Get e11111 IP, reward: IP gain ^1.05 and x 1e40": "获得e11111 无限点，奖励：无限点增益 ^1.05 和 x1e40",
    "Get IP upgrade 33.": "获取 无限点 升级 33.",
    "Get the '-' upgrade in UF layer.": "在 UF 层获得“-”升级。",
    "Get the first upgrade, reward: point x1.25": "获得第一次升级，奖励：点数 x1.25",
    "Get the fourth upgrade, reward: Number x3.": "获得第四次升级，奖励：数字。",
    "I find the miss one!": "我找到了那个小姐！",
    "I forget achievements": "我忘记成就了",
    "Impossible?": "不可能？",
    "Infinity time": "无限时间",
    "Inflatity": "无限",
    "Make game speed >1.": "使游戏速度>1。",
    "Mathematician": "数学家",
    "My server": "我的服务器",
    "More and more": "越来越多",
    "Nine egg": "九个彩蛋",
    "Numbers boost itself.": "数字提升自身。",
    "Omega Cheaper": "欧米伽更便宜",
    "Omega Upgrade": "欧米伽升级",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",

    //树游戏
    'Loading...': '加载中...',
    'ALWAYS': '一直',
    'HARD RESET': '硬重置',
    'Export to clipboard': '导出到剪切板',
    'INCOMPLETE': '不完整',
    'HIDDEN': '隐藏',
    'AUTOMATION': '自动',
    'NEVER': '从不',
    'ON': '打开',
    'OFF': '关闭',
    'SHOWN': '显示',
    'Play Again': '再次游戏',
    'Keep Going': '继续',
    'The Modding Tree Discord': '模型树Discord',
    'You have': '你有',
    'It took you {{formatTime(player.timePlayed)}} to beat the game.': '花费了 {{formatTime(player.timePlayed)}} 时间去通关游戏.',
    'Congratulations! You have reached the end and beaten this game, but for now...': '恭喜你！ 您已经结束并通关了本游戏，但就目前而言...',
    'Main Prestige Tree server': '主声望树服务器',
    'Reach {{formatWhole(ENDGAME)}} to beat the game!': '达到 {{formatWhole(ENDGAME)}} 去通关游戏!',
    'Loading... (If this takes too long it means there was a serious error!)←': '正在加载...（如果时间太长，则表示存在严重错误！）←',
    'Main\n\t\t\t\tPrestige Tree server': '主\n\t\t\t\t声望树服务器',
    'The Modding Tree\n\t\t\t\t\t\t\tDiscord': '模型树\n\t\t\t\t\t\t\tDiscord',
    'Please check the Discord to see if there are new content updates!': '请检查 Discord 以查看是否有新的内容更新！',
    'aqua': '水色',
    'AUTOMATION, INCOMPLETE': '自动化，不完整',
    'LAST, AUTO, INCOMPLETE': '最后，自动，不完整',
    'NONE': '无',
    'P: Reset for': 'P: 重置获得',
    '': '',
    '': '',

}


//需处理的前缀
var cnPrefix = {
    "(-": "(-",
    "(+": "(+",
    "(": "(",
    "-": "-",
    "+": "+",
    " ": " ",
    ": ": "： ",
    "\n": "",
    "                   ": "",
    "                  ": "",
    "                 ": "",
    "                ": "",
    "               ": "",
    "              ": "",
    "             ": "",
    "            ": "",
    "           ": "",
    "          ": "",
    "         ": "",
    "        ": "",
    "       ": "",
    "      ": "",
    "     ": "",
    "    ": "",
    "   ": "",
    "  ": "",
    " ": "",
    //树游戏
    "Show Milestones: ": "显示里程碑：",
    "Autosave: ": "自动保存: ",
    "Offline Prod: ": "离线生产: ",
    "Completed Challenges: ": "完成的挑战: ",
    "High-Quality Tree: ": "高质量树贴图: ",
    "Offline Time: ": "离线时间: ",
    "Theme: ": "主题: ",
    "Anti-Epilepsy Mode: ": "抗癫痫模式：",
    "In-line Exponent: ": "直列指数：",
    "Single-Tab Mode: ": "单标签模式：",
    "Time Played: ": "已玩时长：",
    "Numbers gain ^": "数字增益 ^",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
}

//需处理的后缀
var cnPostfix = {
    ":": "：",
    "：": "：",
    ": ": "： ",
    "： ": "： ",
    "/s)": "/s)",
    "/s": "/s",
    ")": ")",
    "%": "%",
    "                   ": "",
    "                  ": "",
    "                 ": "",
    "                ": "",
    "               ": "",
    "              ": "",
    "             ": "",
    "            ": "",
    "           ": "",
    "          ": "",
    "         ": "",
    "        ": "",
    "       ": "",
    "      ": "",
    "     ": "",
    "    ": "",
    "   ": "",
    "  ": "",
    " ": " ",
    "\n": "",
    "\n\t\t\t": "\n\t\t\t",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
    "": "",
}

//需排除的，正则匹配
var cnExcludeWhole = [
    /^(\d+)$/,
    /^([\d\.]+)e(\d+)$/,
    /^([\d\.]+)$/,
    /^([\d\.]+)s$/,
    /^([\d\.]+)x$/,
    /^x([\d\.]+)$/,
    /^([\d\.,]+)$/,
    /^([\d\.,]+)x$/,
    /^x([\d\.,]+)$/,
    /^([\d\.]+)e([\d\.,]+)$/,
    /^x([\d\.]+)e([\d\.,]+)$/,
    /^([\d\.]+)e([\d\.,]+)x$/,
    /^[\u4E00-\u9FA5]+$/
];
var cnExcludePostfix = [
]

//正则替换，带数字的固定格式句子
//纯数字：(\d+)
//逗号：([\d\.,]+)
//小数点：([\d\.]+)
//原样输出的字段：(.+)
//换行加空格：\n(.+)
var cnRegReplace = new Map([
    [/^You are gaining (.+) Numbers per second$/, '您每秒获得 $1 数字'],
    [/^Boost negative numbers gain by (.+)$/, '提升负数增益 $1'],
    [/^Boosts points gain by (.+)$/, '提升点数增益 $1'],
    [/^Boosts numbers gain by (.+)$/, '提升数字增益 $1'],
    [/^Boosts Numbers gain by (.+)$/, '提升数字增益 $1'],
    [/^You have (.+) points$/, '你有 $1 点数'],
    [/^You have (.+) layers left to unlock.$/, '您还有 $1 层需要解锁。'],
    [/^Next layer at (.+) Number upgrade$/, '下一层 $1 数字升级'],
    [/^Next at (.+) points$/, '下一个在 $1 点数'],
	[/^([\d\.]+)\/sec$/, '$1\/秒'],
	[/^([\d\.]+)e([\d\.,]+)\/sec$/, '$1e$2\/秒'],
	[/^([\d\.]+) Factors$/, '$1 因子'],
	[/^([\d\.,]+) Factors$/, '$1 因子'],
	[/^([\d\.,]+) Infinity$/, '$1 无限'],
	[/^([\d\.,]+) Upgrade Factor$/, '$1 升级因子'],
	[/^([\d\.]+)e([\d\.,]+) Factors$/, '$1e$2 因子'],
	[/^([\d\.]+)e([\d\.,]+) Negative numbers$/, '$1e$2 负数'],
	[/^([\d\.]+)e([\d\.,]+) Numbers$/, '$1e$2 数字'],
	[/^([\d\.]+) Factor shift$/, '$1 因子偏移'],
	[/^([\d\.]+) Numbers$/, '$1 数字'],
	[/^Boost \'([\d\.]+)\'.$/, '提升 \'$1\'.'],
	[/^([\d\.]+) OOMs\/sec$/, '$1 OOMs\/秒'],
    [/^requires ([\d\.]+) more research points$/, '需要$1个研究点'],
    [/^(\d+) Royal points$/, '$1 皇家点数'],
    [/^Cost: (\d+) RP$/, '成本：$1 皇家点数'],
    [/^Currently: (.+)x$/, '当前：$1x'],
    [/^Get (.+) Number upgrade.$/, '获得 $1 数字升级。'],
    [/^Cost: (.+) Numbers$/, '成本：$1 数字'],
    [/^Cost : (.+) Numbers$/, '成本：$1 数字'],
    [/^Usages: (\d+)\/$/, '用途：$1\/'],
    [/^workers: (\d+)\/$/, '工人：$1\/'],

]);